home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / aanexa1a / form1.frm next >
Text File  |  1998-10-07  |  3KB  |  88 lines

  1. VERSION 5.00
  2. Begin VB.Form Form1 
  3.    BorderStyle     =   4  'Fixed ToolWindow
  4.    Caption         =   "Pop-up Menu"
  5.    ClientHeight    =   4350
  6.    ClientLeft      =   150
  7.    ClientTop       =   675
  8.    ClientWidth     =   6555
  9.    LinkTopic       =   "Form1"
  10.    MaxButton       =   0   'False
  11.    MinButton       =   0   'False
  12.    ScaleHeight     =   4350
  13.    ScaleWidth      =   6555
  14.    ShowInTaskbar   =   0   'False
  15.    StartUpPosition =   3  'Windows Default
  16.    Begin VB.Menu mnuPopUp 
  17.       Caption         =   "Pop-Up"
  18.       Begin VB.Menu mnuPopUp_WebPage 
  19.          Caption         =   "Our Web Page"
  20.       End
  21.       Begin VB.Menu mnuPopUp_Somethingelse 
  22.          Caption         =   "Something else"
  23.       End
  24.       Begin VB.Menu mnuPopUp_Ugly 
  25.          Caption         =   "Pictures of my mom"
  26.       End
  27.       Begin VB.Menu mnuPopUp_About 
  28.          Caption         =   "About"
  29.       End
  30.       Begin VB.Menu mnuPopUp_Exit 
  31.          Caption         =   "Exit"
  32.       End
  33.    End
  34. End
  35. Attribute VB_Name = "Form1"
  36. Attribute VB_GlobalNameSpace = False
  37. Attribute VB_Creatable = False
  38. Attribute VB_PredeclaredId = True
  39. Attribute VB_Exposed = False
  40. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  41. 'Pop-Up menu example
  42. 'Dustin Davis
  43. 'Bootleg Software Inc.
  44. 'Http://www.warpnet.org/bsi
  45. '
  46. 'I hope this helps you! If not, well, I dunno
  47. 'Please feel free to e-mail me for questions. I get lonley sometimes!!
  48. '
  49. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  50.  
  51. Private Sub Form_Load()
  52. mnuPopUp.Visible = False 'you can have this on if you want
  53. End Sub
  54.  
  55. Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
  56. 'this is the place to control the buttons
  57. If Button = 2 Then 'if they right click, 1=left, 2=right
  58.     Form1.PopupMenu mnuPopUp 'show popup menu
  59. Else 'else if they clicked the left button
  60.     DoEvents
  61. End If
  62. End Sub
  63.  
  64. Private Sub mnuPopUp_About_Click()
  65. 'and still, they keep coming!
  66. MsgBox "Dustin Davis" & vbCrLf & "Bootleg Software Inc." & vbCrLf & "Planet Source Code Rules!"
  67. End Sub
  68.  
  69. Private Sub mnuPopUp_Exit_Click()
  70. 'this is one of the menu functions. You can add more
  71. Unload Me
  72. End Sub
  73.  
  74. Private Sub mnuPopUp_Somethingelse_Click()
  75. 'yet another menu function
  76. MsgBox "Alot more junk!"
  77. End Sub
  78.  
  79. Private Sub mnuPopUp_Ugly_Click()
  80. 'still, another function of the menu!
  81. MsgBox "HEY! Are you some kind of sick wierd`o? Why would you wanna see my mom naked?!"
  82. End Sub
  83.  
  84. Private Sub mnuPopUp_WebPage_Click()
  85. 'another menu function
  86. MsgBox "This is where you add stuff!"
  87. End Sub
  88.